package com.test.web.excel.converter;

import cn.hutool.core.date.DateUtil;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;
import com.he.core.excle.converter.DefaultDateConverter;

import java.util.Date;

/**
 * @author heyanjing
 * date:2020-08-10 2020/8/10:13:54
 */
public class DlDateConverter extends DefaultDateConverter {

    @Override
    public CellData convertToExcelData(Date value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return new CellData(DateUtil.format(value, "yyyy年MM月dd日 HH:mm:ss"));
    }

}
